package com.visionet.school.app.web.entity.enums;

/**
 * Created by hxpeng on 2017/5/18.
 */
public enum MemberFileType {

    ALBUM("album","精彩瞬间"),
    ENTRUST("entrust","嘱托"),
    DYNAMIC("dynamic","班级动态");

    private String key;
    private String value;

    MemberFileType(String key, String value){
        this.key = key;
        this.value = value;
    }

    public static MemberFileType fromCode(String key){
        for (MemberFileType type : values()){
            if(type.key.equalsIgnoreCase(key)){
                return type;
            }
        }
        return null;
    }

    public String toKey() {
        return key;
    }

    public String getValue() {
        return value;
    }
}
